<template>
  <div class="page-wrap">
    <div
      v-if="slots.includes('form')"
      class="page-wrap__form"
      :class="formClass"
      :style="tabClass"
    >
      <slot name="form"></slot>
    </div>
    <div class="page-wrap__content" :class="contentClass">
      <slot></slot>
    </div>
  </div>
</template>
<script lang="jsx" setup>
const slots = computed(() => Object.keys(useSlots()));

defineProps({
  formClass: { type: String, default: "" },
  tabClass: { type: String, default: "" },
  contentClass: { type: String, default: "" },
});
</script>
<style lang="scss" scoped>
.page-wrap {
  font-size: 14px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  &__form {
    display: flex;
    width: 100%;
    padding: 8px 8px 0;
  }
  &__content {
    flex: 1;
    display: flex;
    min-height: 0;
    flex-direction: column;
    margin-top: 0;
    padding: 2px 10px;
    padding-bottom: 25px;
    position: relative;
    box-sizing: border-box;
  }
}
</style>
